package com.firebird.oms.domain.sm;

// Generated 2009-12-4 16:04:41 by Hibernate Tools 3.2.5.Beta

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * TismStaticValue generated by hbm2java
 */
@Entity
@Table(name = "tism_static_value")
public class TismStaticValue implements java.io.Serializable {

	private static final long serialVersionUID = 8073513540952269957L;
	private Integer id;
	private Integer staticTypeId;
	private String staticValue;
	private String staticDesc;
	private String chooseValue1;
	private String chooseValue2;
	private String chooseValue3;
	private Integer state;
	private String attr;

	public TismStaticValue() {
	}

	public TismStaticValue(Integer id, Integer staticTypeId,
			String staticValue, String chooseValue1, String chooseValue2,
			String chooseValue3, Integer state) {
		this.id = id;
		this.staticTypeId = staticTypeId;
		this.staticValue = staticValue;
		this.chooseValue1 = chooseValue1;
		this.chooseValue2 = chooseValue2;
		this.chooseValue3 = chooseValue3;
		this.state = state;
	}

	public TismStaticValue(Integer id, Integer staticTypeId,
			String staticValue, String staticDesc, String chooseValue1,
			String chooseValue2, String chooseValue3, Integer state, String attr) {
		this.id = id;
		this.staticTypeId = staticTypeId;
		this.staticValue = staticValue;
		this.staticDesc = staticDesc;
		this.chooseValue1 = chooseValue1;
		this.chooseValue2 = chooseValue2;
		this.chooseValue3 = chooseValue3;
		this.state = state;
		this.attr = attr;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "static_type_id", nullable = false)
	public Integer getStaticTypeId() {
		return this.staticTypeId;
	}

	public void setStaticTypeId(Integer staticTypeId) {
		this.staticTypeId = staticTypeId;
	}

	@Column(name = "static_value", nullable = false, length = 36)
	public String getStaticValue() {
		return this.staticValue;
	}

	public void setStaticValue(String staticValue) {
		this.staticValue = staticValue;
	}

	@Column(name = "static_desc", length = 160)
	public String getStaticDesc() {
		return this.staticDesc;
	}

	public void setStaticDesc(String staticDesc) {
		this.staticDesc = staticDesc;
	}

	@Column(name = "choose_value1", nullable = false, length = 36)
	public String getChooseValue1() {
		return this.chooseValue1;
	}

	public void setChooseValue1(String chooseValue1) {
		this.chooseValue1 = chooseValue1;
	}

	@Column(name = "choose_value2", nullable = false, length = 36)
	public String getChooseValue2() {
		return this.chooseValue2;
	}

	public void setChooseValue2(String chooseValue2) {
		this.chooseValue2 = chooseValue2;
	}

	@Column(name = "choose_value3", nullable = false, length = 36)
	public String getChooseValue3() {
		return this.chooseValue3;
	}

	public void setChooseValue3(String chooseValue3) {
		this.chooseValue3 = chooseValue3;
	}

	@Column(name = "state", nullable = false)
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "attr", length = 20)
	public String getAttr() {
		return this.attr;
	}

	public void setAttr(String attr) {
		this.attr = attr;
	}

	public boolean equals(final Object other) {
		if (!(other instanceof TismStaticValue))
			return false;
		TismStaticValue castOther = (TismStaticValue) other;
		return new EqualsBuilder().append(id, castOther.id).append(
				staticTypeId, castOther.staticTypeId).append(staticValue,
				castOther.staticValue).append(staticDesc, castOther.staticDesc)
				.append(chooseValue1, castOther.chooseValue1).append(
						chooseValue2, castOther.chooseValue2).append(
						chooseValue3, castOther.chooseValue3).append(state,
						castOther.state).append(attr, castOther.attr)
				.isEquals();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(id).append(staticTypeId).append(
				staticValue).append(staticDesc).append(chooseValue1).append(
				chooseValue2).append(chooseValue3).append(state).append(attr)
				.toHashCode();
	}

	public String toString() {
		return new ToStringBuilder(this).append("id", id).append(
				"staticTypeId", staticTypeId)
				.append("staticValue", staticValue).append("staticDesc",
						staticDesc).append("chooseValue1", chooseValue1)
				.append("chooseValue2", chooseValue2).append("chooseValue3",
						chooseValue3).append("state", state).append("attr",
						attr).toString();
	}

}
